function [ROIs]=ROI_activity(data,ROIs)

for cell_nr=1:length(ROIs)
    %disp(['Processing cell nr. ' num2str(cell_nr) ' of ' num2str(length(ROIs))]);
    cell_act=zeros(size(data,3),1);
    
    for ind=1:size(data,3)
        cell_act(ind)=mean(data(ROIs(cell_nr).indices+(ind-1)*size(data,1)*size(data,2)));
    end
    
    ROIs(cell_nr).activity=cell_act;
end

% np_act=zeros(size(data,3),1);
% for ind=1:size(data,3)
%     np_act(ind)=mean(data(np.indices+(ind-1)*size(data,1)*size(data,2)));
% end
% np.activity=np_act;